<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="java.sql.Date"%>
<%@page import="com.tarena.dao.*"%>
<%@page import="com.tarena.domain.*"%>
<%
	ProductDao pd = new ProductDao();
	List<Product> pro = pd.getProduct();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="../css/style.css" type="text/css" rel="stylesheet" />
	</head>

	<body topMargin="10">
		<div id="append_parent"></div>

		<table cellSpacing="6" cellPadding="2" width="100%" border="0">
			<tbody>
				<tr>
					<td>
						<table class="guide" cellSpacing="0" cellPadding="0" width="100%"
							border="0">
							<tbody>
								<tr>
									<td>
										&nbsp;
									</td>
								</tr>
							</tbody>
						</table>
						<br />

						<form action="delete.jsp"
							onsubmit="return confirm('确认删除')">

							<table class="tableborder" cellSpacing="0" cellPadding="0"
								width="100%" border="0">
								<tbody>
									<tr class="header">
										<td class="altbg1">
											<b>&nbsp;</b>
										</td>
										<td class="altbg1">
											<b>编&nbsp;&nbsp;&nbsp;&nbsp; 号</b>
										</td>
										<td class="altbg1">
											<b>品&nbsp;&nbsp;&nbsp;&nbsp; 牌</b>
										</td>
										<td class="altbg1">
											<b>型&nbsp;&nbsp;&nbsp; 号</b>
										</td>	
										<td class="altbg1">
											<b>生产时间</B>
										</td>
										<td class="altbg1">
											<b>上市时间</B>
										</td>
										<td class="altbg1">
											<b>价格</B>
										</td>

									</tr>
								</tbody>
								<tbody>

									<%
									for(Product p : pro){	
									 %>
									<tr>
										<td class="altbg2">
											<input type="checkbox" name="productId" value="<%=p.getId() %>" />
										</td>
										<td class="altbg2" width="20%">
											<a href="detail.jsp?id=<%=p.getId()%>">
												<b><%=p.getId() %></b>
											</a>
										</td>
										<td class="altbg2">
											<b><%=p.getBrand() %></b>
										</td>	
										<td class="altbg2">
											<b><%=p.getModel() %></b>
										</td>
										<td class="altbg2">
											<b><%=p.getBornTime() %></b>
										</td>
										<td class="altbg2">
											<b><%=p.getOfferTime() %></b>
										</td>
										<td class="altbg2">
											<b><%=p.getPrice() %>$</b>
										</td>
									</tr>
									<%
									}
									%>
								</tbody>
							</table>
							<br />
							<center>
								<input class="button" type="submit" value="删除项目"
									name="settingsubmit">

								<input class="button" type="button" value="新建项目"
									name="settingsubmit" onclick="location= 'form.jsp'" ;/>
							</center>
						</form>
					</td>
				</tr>
			</tbody>
		</table>

	</body>
</html>
